package com.demo.core.service.exception.base;

/**
 * 对象创建异常
 * 
 * @author ryuu.kk
  */
public class ObjectCreateException extends RuntimeException {

	/**
	 * 序列化对象
	 */
	private static final long serialVersionUID = -2589782557087456001L;
	/**
	 * 异常对象
	 */
	private final Object object;
	/**
	 * 构造函数
	 * @param target 异常对象
	 * @param message 异常消息
	 */
	public ObjectCreateException(Object target, String message) {
		super(message);
		this.object = target;
	}
	/**
	 * 构造函数
	 * @param target 异常对象
	 * @param message 异常消息
	 * @param cause Throwable
	 */
	public ObjectCreateException(Object target, String message, Throwable cause) {
		super(message, cause);
		this.object = target;
	}
	
	public Object getObject() {
		return object;
	}
}
